var a = [1, 2, 3, 4]
!~a.indexOf(5) && a.push(5)
console.log(a)
